Skip to content

fix: Incorrect horizontal scrollbar displayed.#160

Merged
paxcut merged 4 commits into
WerWolv:masterfrom
paxcut:BadHorizontalScrolling
May 1, 2025
Merged

fix: Incorrect horizontal scrollbar displayed.#160
paxcut merged 4 commits into
WerWolv:masterfrom
paxcut:BadHorizontalScrolling

Conversation

@paxcut
Copy link
Copy Markdown
Collaborator

@paxcut paxcut commented Apr 10, 2025

After the recent changes to scrolling the code uses the longest line in the source code to determine if and how big horizontal scrollbars are needed. Instead of the computationally expensive calculation of the longest line, we let the lexer record it when it generates the token stream. It turns out that the lexer is also getting token streams for the included and imported files which leads to the problem.

Instead of letting the lexer do both the recording and the reporting of the longest line in the code we use the preprocessor to intercept the value before the included and imported files are preprocessed.

The fix is incomplete unless an upcoming PR to ViewPatterneditor.cpp where the longest line size is sent to the text editor is also included.

paxcut and others added 2 commits April 9, 2025 19:40
After the recent changes to scrolling the code uses the longest line in the source code to determine if and how big horizontal scrollbars are needed. Instead of the computationally expensive calculation of the longest line, we let the lexer record it when it generates the token stream. It turns out that the lexer is also getting token streams for the included and imported files which leads to the problem.

Instead of letting the lexer do both the recording and the reporting of the longest line in the code we use the preprocessor to intercept the value before the included and imported files are preprocessed.

The fix is incomplete unless an upcoming PR to ViewPatterneditor.cpp where the longest line size is sent to the text editor is also  included.
@paxcut paxcut added the bug Something isn't working label May 1, 2025
@paxcut paxcut merged commit a6fca08 into WerWolv:master May 1, 2025
6 of 7 checks passed
@paxcut paxcut deleted the BadHorizontalScrolling branch July 9, 2025 00:18
lawm pushed a commit to lawm/PatternLanguage that referenced this pull request Mar 13, 2026
* fix: Incorrect horizontal scrollbar displayed.

After the recent changes to scrolling the code uses the longest line in the source code to determine if and how big horizontal scrollbars are needed. Instead of the computationally expensive calculation of the longest line, we let the lexer record it when it generates the token stream. It turns out that the lexer is also getting token streams for the included and imported files which leads to the problem.

Instead of letting the lexer do both the recording and the reporting of the longest line in the code we use the preprocessor to intercept the value before the included and imported files are preprocessed.

The fix is incomplete unless an upcoming PR to ViewPatterneditor.cpp where the longest line size is sent to the text editor is also  included.

* Update fmt submodule to the latest version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant